package com.longcai.service.impl.sys;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.longcai.entity.auth.SysShopsPermission;
import com.longcai.mapper.SysShopsPermissionMapper;
import com.longcai.service.sys.SysShopsPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author ZJ
 * @since 2019-03-16
 */
@Service
public class SysShopsPermissionServiceImpl extends ServiceImpl<SysShopsPermissionMapper, SysShopsPermission> implements SysShopsPermissionService {

    @Autowired
    private SysShopsPermissionMapper SysShopsPermissionMapper;

    @Override
    public List<SysShopsPermission> listParents() {
        return this.SysShopsPermissionMapper.listParents();
    }

    @Override
    public SysShopsPermission getById(Integer id) {

        return this.SysShopsPermissionMapper.selectById(id);
    }

    @Override
    public void updatePermission(SysShopsPermission SysShopsPermission) {
        this.SysShopsPermissionMapper.updateById(SysShopsPermission);
    }

    @Override
    public List<SysShopsPermission> listByRoleId(String roleId) {
        return this.SysShopsPermissionMapper.listByRoleId(roleId);
    }
}
